package com.weijian.dal.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.io.Serializable;

/**
 * 菜品表
 */
@Data
@Schema(description = "菜品表")
@TableName(value = "item", autoResultMap = true)
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Item extends BaseDO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 菜品id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "菜品id")
    private Long id;

    /**
     * 菜品分类id
     */
    @Schema(description = "菜品分类id")
    private Long categoryId;

    /**
     * 菜品名称
     */
    @Schema(description = "菜品名称")
    private String name;

    /**
     * 价格（分）
     */
    @Schema(description = "价格（分）")
    private Integer price;

    /**
     * 菜品图片
     */
    @Schema(description = "菜品图片")
    private String image;

    /**
     * 规格
     */
    @Schema(description = "规格")
    private String spec;

    /**
     * 销量
     */
    @Schema(description = "销量")
    private Integer sold;

    /**
     * 描述信息
     */
    @Schema(description = "描述信息")
    private String description;

    /**
     * 菜品状态 1-正常，0-下架
     */
    @Schema(description = "菜品状态 1-正常，0-下架")
    private Integer status;

}
